<template>
  <div>
    <editor ref="jsEditer" v-model="content" @init="editorInit" lang="javascript" theme="eclipse" width="100%" height="100%" :options="{
       enableBasicAutocompletion: true,
       enableSnippets: true,
       enableLiveAutocompletion: true,
       tabSize:2,
       fontSize:17,
       showPrintMargin:false
     }"></editor>
  </div>
</template>
<script>
  export default {
    name:'Javascript',
    data(){
      return {
        content:'//请在下方输入你的Javascript代码'
      }
    },
    components:{
      editor: require('vue2-ace-editor')
    },
    methods: {
      editorInit: function () {
        require("brace/ext/language_tools");
        require("brace/mode/javascript");
        require("brace/snippets/javascript");
        require("brace/theme/eclipse");
      }
    }
  }
</script>
